package jee.boot.common.utils.excel.excel;

import java.io.Serializable;

/**
 * excel 解析 单元格数据异常消息
 */
public class ErrorMessage implements Cloneable,Serializable {
    private int x;// excel 行
    private int y;// excel 列
    private String message;// excel异常消息
    private ErrorType type;

    public ErrorMessage() {
    }

    public ErrorMessage(int x, int y, String message,ErrorType type) {
        this.x = x;
        this.y = y;
        this.message = message;
        this.type=type;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public ErrorType getType() {
        return type;
    }

    public void setType(ErrorType type) {
        this.type = type;
    }

    /**
     * 异常类型枚举
     */
    public enum ErrorType {
        DictException,//字典翻译
        IllegalArgumentException,// 类型转换
        Exception //其他异常

    }
    @Override
    public Object clone() {
        ErrorMessage stu = null;
        try{
            stu = (ErrorMessage)super.clone();
        }catch(CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return stu;
    }

}
